import re


def my_repl2(m1):
    return m1.group(1)

s_s = '高高高高兴兴兴兴'
s = "我今天天天天真真高高高高兴兴兴兴"
p = r"(.)\1+"
res = re.sub(p, my_repl2, s)
print(res)
# res = re.findall(p,s)
# print(res)

res1 = re.match(p,s_s)
print(res1.groups())

